import Mock from 'mockjs';

let item = [{
		key: "/kclx/all",
		method: "get",
		param: {
			
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA|1-4': [{
					"kclxid": /[A-Z][a-z][0-9][0-9][0-9][0-9][0-9][0-9]/,
					"kcname": "@cword(6,9)",
					"sdz": "@csentence",
					"cover": "https://tse1-mm.cn.bing.net/th/id/OIP-C.0C2Zz8pZZEVhfSgSdZ8WUQHaE7?rs=1&pid=ImgDetMain",
					"jlid":'@id',
					"jlname":'@cname',
					"roomid":'@id',
					"rname":'@ctitle(3, 5)会议室',
					"storeid":'@id',
					"sname":'@city@cword(商城,中心,旗舰店)',
					"jd":'@float(-180, 180, 5, 5)',
					"wd":'@float(-90, 90, 5, 5)',
					"address":'@county(true)',
					"pcode":'@province',
					"scode":'@city',
					"qcode":'@county',
					"zt":"进行中",
					"zxrs": '@natural(1, 5)', // 最小人数（1-5）
					"zdrs": function() {
					  // 正确写法：生成 5-10 的随机数，并确保 zdrs > zxrs
					  return this.zxrs + Mock.Random.natural(5, 10);
					},
					"ybrs": function() {
					  // 正确写法：在 zxrs 和 zdrs 之间生成随机数
					  return Mock.Random.natural(this.zxrs, this.zdrs);
					},
					
											"price":"@float(10, 1000, 2, 2)",
											"ms":'@courseDescription',
											"cs":'@courseDuration',
											"st":'@datetime("HH:mm:ss")',
											"et":function() {                // 结束时间（开始时间+1-3小时）
					    const start = new Date(`2024-01-01 ${this.startTime}`);
					    return new Date(start.getTime() + Mock.Random.integer(1, 3)*60*60*1000)
					            .toTimeString().split(' ')[0];
					  },
					  "lxname":"拳击类",

				}]
			});
		}
	},
	{
		key: "/kclx/page",
		method: "get",
		param: {
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {
					'current': 0,
					'size': 10,
					'pages': 6,
					'total': 55,
					"records|10": [{
						"akclxid": /[A-Z][a-z][0-9][0-9][0-9][0-9][0-9][0-9]/,
						"pid":"123",
						"kcname":"自由搏击",
						"lxname":"拳击类",
						"zs":"123",//追溯类型ID
						"cover":"https://tse1-mm.cn.bing.net/th/id/OIP-C.t6OSXIJkI2WgXZysVhVl3gHaE8?rs=1&pid=ImgDetMain",
						
					}]
				}
			});
		}
	},
	{
		key: "/kclx/info",
		method: "get",
		param: {
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {
					"kclxid": /[A-Z][a-z][0-9][0-9][0-9][0-9][0-9][0-9]/,
					"ms":"干就完了，奥里给！",
					"cover":"https://tse1-mm.cn.bing.net/th/id/OIP-C.t6OSXIJkI2WgXZysVhVl3gHaE8?rs=1&pid=ImgDetMain",
					"kcname":"自由搏击基础",
					"lxname":"拳击",
					"jlname": "李教练",       // 新增教练名称
					"pid":"123",
					"zs":"1234",
					
					        
											
				}
			})
		}
	},

	{
		key: "/kclx/info",
		method: "post",
		param: {
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {

				}
			})
		}
	},
	{
		key: "/kclx/info",
		method: "put",
		param: {
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {

				}
			})
		}
	},
	{
		key: "/kclx/info",
		method: "delete",
		param: {
			empId: '',
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {

				}
			})
		}
	},

]
export default item;